Decorate the class with @Entity() and annotate columns with @Column(), @PrimaryGeneratedColumn(), @CreateDateColumn(), etc. Register the entity in a feature module using TypeOrmModule.forFeature([Entity]) which makes Repository<Entity> available for injection via @InjectRepository().
TypeOrmModule.forFeature([User]) registers Repository<User> in the module's DI scope.
@InjectRepository(User) is the token used to inject the repository — matches forFeature() registration.
select: false on @Column() excludes the field from SELECT queries unless explicitly selected.
Entities must be referenced in TypeOrmModule.forRoot() entities array or glob — otherwise they are invisible.
@OneToMany, @ManyToOne, @ManyToMany define relationships; always provide the inverse side.